/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Lenovo
 * Date: 2025-05-26
 * Time: 21:05
 */
class Student{
    private String name;
    private int num;
    private int math;
    private int english;
    private int computer;
    public Student(){};
    public Student(String name,int num,int math,int english,int computer){
        this.name=name;
        this.num=num;
        this.math=math;
        this.english=english;
        this.computer=computer;
    }
    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", num=" + num +
                ", math=" + math +
                ", english=" + english +
                ", computer=" + computer +
                '}';
    }

    public void setName(String name){
        this.name=name;
    }
    public String getName(){
        return this.name;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public int getMath() {
        return math;
    }

    public void setMath(int math) {
        this.math = math;
    }

    public int getEnglish() {
        return english;
    }

    public void setEnglish(int english) {
        this.english = english;
    }

    public int getComputer() {
        return computer;
    }

    public void setComputer(int computer) {
        this.computer = computer;
    }
    public int sum(){
        return this.computer+this.math+this.english;
    }
    public double avg(){
        return sum()/3.0;
    }
    public int max(){
        int max=this.computer>this.math?this.computer:this.math;
        max=this.computer>this.english?this.computer:this.english;
        return max;
    }
    public int min(){
        int min=this.computer<this.math?this.computer:this.math;
        min=this.computer<this.english?this.computer:this.english;
        return min;
    }
}
public class Test {
    public static void main(String[] args) {
        Student student1=new Student("小明",20250001,90,95,100);
        System.out.println(student1);
        System.out.println("最高分="+student1.max());
        System.out.println("最低分="+student1.min());
        System.out.println("总分="+student1.sum());
        System.out.println("平均分="+student1.avg());
    }
}
